Ext.define('Zm.view.tour.LogItems',{
    alias:'widget.tourlogitems',
    extend:'Ext.window.Window',
    requires:[
        'Ext.grid.RowNumberer',
        'Zm.model.TourLogItem'
    ],
    layout:'fit',
    autoShow:true,
    width:400,
    height:400,
    initComponent:function(){
        var me = this,
            lang = Zm.i18n.Lang;
            
        Ext.apply(me,{
            title: lang.tLogData,
            items:[{
                xtype:'grid',
                store:'TourLogItem',
                columns:[
                    {xtype:'rownumberer',text:lang.tIndex,width:35},
                    {text:lang.tDataName,dataIndex:'dname',flex:1},
                    {text:lang.tVal,dataIndex:'val'}                
                ],
                viewConfig : {
                    loadMask : false
                }
            }]
        });
        
        me.callParent(arguments);
    },
    setValue:function(logid){
        var me = this,
            grid = me.down('grid'),
            proxy = grid.store.getProxy();
        proxy.extraParams = {logid:logid};
        grid.store.load();
    }    
});